﻿using System;
using System.Configuration;

namespace NDBGen.Configuration
{
    [ConfigurationCollection(typeof(SourceFileElement))]
    public class DataSourceGroupElement : GenericElementCollection<SourceFileElement>, ICollectionItemElement
    {
        const String PROPNAME_NAME = "name";
        [ConfigurationProperty(PROPNAME_NAME, IsKey = true, IsRequired = true)]
        public String Name
        {
            get { return (String)this[PROPNAME_NAME]; }
            set { this[PROPNAME_NAME] = value; }
        }

        #region [ IConfigurationElement Members ]

        Object ICollectionItemElement.Key
        {
            get { return this.Name; }
        }

        #endregion
    }
}